package com.ruoyi.supermarket.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.supermarket.mapper.PurchaseMapper;
import com.ruoyi.supermarket.domain.Purchase;
import com.ruoyi.supermarket.service.IPurchaseService;

/**
 * 进货管理Service业务层处理
 * 
 * @author wzy
 * @date 2024-07-22
 */
@Service
public class PurchaseServiceImpl implements IPurchaseService 
{
    @Autowired
    private PurchaseMapper purchaseMapper;

    /**
     * 查询进货管理
     * 
     * @param pid 进货管理主键
     * @return 进货管理
     */
    @Override
    public Purchase selectPurchaseByPid(Long pid)
    {
        return purchaseMapper.selectPurchaseByPid(pid);
    }

    /**
     * 查询进货管理列表
     * 
     * @param purchase 进货管理
     * @return 进货管理
     */
    @Override
    public List<Purchase> selectPurchaseList(Purchase purchase)
    {
        return purchaseMapper.selectPurchaseList(purchase);
    }

    /**
     * 新增进货管理
     * 
     * @param purchase 进货管理
     * @return 结果
     */
    @Override
    public int insertPurchase(Purchase purchase)
    {
        return purchaseMapper.insertPurchase(purchase);
    }

    /**
     * 修改进货管理
     * 
     * @param purchase 进货管理
     * @return 结果
     */
    @Override
    public int updatePurchase(Purchase purchase)
    {
        return purchaseMapper.updatePurchase(purchase);
    }

    /**
     * 批量删除进货管理
     * 
     * @param pids 需要删除的进货管理主键
     * @return 结果
     */
    @Override
    public int deletePurchaseByPids(Long[] pids)
    {
        return purchaseMapper.deletePurchaseByPids(pids);
    }

}
